import React from "react";

class Declare extends React.Component {
    
    state = {
        environment : "测试"
    }
    constructor(props) {
        super(props);
        this.state = {environment: "生产"};
    }
    componentDidMount() {
        this.setState({environment: "线上"})
    }
    render() {

        console.log("run render function")

        return (
            <h2>生命周期 - { this.state.environment }</h2>
        )
    }
    
}

export default Declare